﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Configuration;
using System.Reflection;
using System.Data.Common;
using System.Data.SqlClient;

namespace DusonFramework.DataAccess.Utility
{
    public abstract class SQLProvider
    {
        private static SQLHelper _sqlHelperInstance = null;
        private static readonly object _lockObj = new object();

        public SQLProvider() { }

        public SQLHelper SQLHelperInstance
        {
            get
            {
                if (_sqlHelperInstance == null)
                {
                    lock (_lockObj)
                    {
                        if (_sqlHelperInstance == null)
                        {
                            _sqlHelperInstance = this.Create();
                        }
                    }
                }

                return _sqlHelperInstance;
            }
        }

        protected abstract SQLHelper Create();

    }

}
